From b8af4123ed9d2c39b4706724778c47b18b7e3e8f Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 20 Dec 2007 10:43:06 +0000 Subject: [PATCH] hvm: Fix TPMD and QEMU connection In HVM domain, MA_Transmit function in tcgbios sometimes become an error (TCG_NO_RESPONSE). The cause of the error is not to make connection of QEMU and TPMD instance within a timeout of MA_Transmit function. Before the MA_Transmit function was called, the attached patch corrected so that connection of QEMU and TPMD might be completed. Signed-off-by: Kouichi YASAKI --- tools/ioemu/hw/tpm_tis.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/ioemu/hw/tpm_tis.c b/tools/ioemu/hw/tpm_tis.c index c40a33e677..3c67921822 100644 --- a/tools/ioemu/hw/tpm_tis.c +++ b/tools/ioemu/hw/tpm_tis.c @@ -904,6 +904,11 @@ void tpm_tis_init(SetIRQFunc *set_irq, void *opaque, int irq) memset(s->buffer.buf,0,sizeof(s->buffer.buf)); register_savevm("tpm-tis", 0, 1, tpm_save, tpm_load, s); + + for (c = 0; !IS_COMM_WITH_VTPM(s) && (c < 5); c++) { + open_vtpm_channel(s); + sleep(1); + } } /****************************************************************************/ -- 2.30.2